% title = 'Login'
% include(top)

<div class="pure-g creds">
	<div class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-3"></div>
	<div class="pure-u-1 pure-u-md-1-2 pure-u-lg-1-3">
		<h1>Login</h1>
% if success:
		<h3>Successfully logged in as {{success}}!</h3>
		<p><a href="/user/">Click here</a> if you aren't automatically redirected in 5 seconds.</p>
		<meta http-equiv="refresh" content="2;url=http://paste.hydra.ws/user">
	
% else:
		<form action="/login" method="post" class="pure-form pure-form-aligned">
	
% if failure:
			<p class="error">Oh noes! Your username/password isn't recognized.</p>
% elif anon_failure:
			<p class="error">You cannot login as anonymous.</p>
% elif login_needed:
			<p>You need to login to use that feature!</p>
% end  # (if)
			<p>Don't have an account? You can always <a href="/register">make one.</a></p>
			<fieldset class="pure-group">
				<!-- <label for="username">Username</label> -->
				<input class="pure-input-1" required name="username" type="text" placeholder="Username" autofocus>
				<!-- <label for="password">Password</label> -->
				<input class="pure-input-1" required name="password" type="password" placeholder="Password">
			</fieldset>
			<fieldset class="pure-group">
				<input id="cb" name="remember" type="checkbox" style="float: left; margin-top: 2px;>">
				<div style="margin-left: 25px;">
					Remember Me
				</div>
				<button class="pure-button pure-input-1 pure-button-primary" type="submit">Login</button>
			</fieldset>
% if redirect:
				<input type="hidden" name="redirect" value="{{redirect}}">
% end  # (if)
		</form>
% end  # (if)
	</div>
	<div class="pure-u-1 pure-u-md-1-4 pure-u-lg-1-3"></div>
</div>

% include(bottom)
